<aside th:fragment="left-menu" class="main-sidebar"
       xmlns:th="http://www.thymeleaf.org"
       xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
    <!-- sidebar: style can be found in sidebar.less -->
    <section class="sidebar">
        <!-- Sidebar user panel -->
        <div class="user-panel">
            <div class="pull-left image">
                <img th:src="@{__${#authentication.getPrincipal().avatar}__}" class="img-circle" alt="User Image">
            </div>
            <div class="pull-left info">
                <p sec:authentication="name">用户名</p>
                <a href="#"><i class="fa fa-circle text-success"></i> Online</a>
            </div>
        </div>
        <!-- search form -->
        <form action="#" method="get" class="sidebar-form">
            <div class="input-group">
                <input type="text" name="q" class="form-control" placeholder="Search...">
                <span class="input-group-btn">
                <button type="submit" name="search" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i>
                </button>
              </span>
            </div>
        </form>
        <!-- /.search form -->
        <!-- sidebar menu: : style can be found in sidebar.less -->
        <ul class="sidebar-menu" data-widget="tree">
            <li class="header">操作面板</li>
            <!--/*@thymesVar id="nodes" type="java.util.List<in.hocg.web.lang.utils.tree.Node<in.hocg.web.modules.system.domain.SysMenu>>"*/-->
            <th:block th:with="nodes=${@langService.getLeftMenu()}">
                <li class="treeview"
                    th:each="root, i: ${nodes}">
                    <a th:href="${root.node.url?:'#'}">
                        <i th:class="${root.node.icon}"></i> <span th:text="${root.node.name}">系统配置</span>
                        <span class="pull-right-container">
                          <i class="fa fa-angle-left pull-right"></i>
                        </span>
                    </a>
                    <ol th:if="${root.children != null}"
                        th:replace="/admin/_widgets/tree-menu::tree-menu(${root.children})"></ol>
                </li>
            </th:block>
            <li class="header">标签</li>
            <li><a href="#"><i class="fa fa-circle-o text-red"></i> <span>Important</span></a></li>
            <li><a href="#"><i class="fa fa-circle-o text-yellow"></i> <span>Warning</span></a></li>
            <li><a href="#"><i class="fa fa-circle-o text-aqua"></i> <span>Information</span></a></li>
        </ul>
    </section>
    <!-- /.sidebar -->
</aside>